<div id="sidebar" class="noprint">
	<div class="outer">
		<div class="inner clearfix">
			
			<?php if (is_category()) { 
				echo get_parent_cat_name('<h3>Browse ',' by...</h3>');
			?>
				
			<ul class="tabs">
				<li class="widget_category"><a href="#">Category</a></li>
				<li class="widget_author"><a href="#">Tag</a></li>
			</ul><!-- tabs -->
								
			<div class="widget_content">
				<div class="widget_category">
						
					<?php
					if(is_single()){						
						$this_category 	= get_category(get_parent_cat_id());
					}
					else {
						$this_category 	= get_category($cat);			
					}
								
					if($this_category->category_parent){
						$this_category = wp_list_categories('orderby=id&show_count=0&title_li=&use_desc_for_title=1&child_of='.$this_category->category_parent."&echo=0"); 				
					}
					else {
						$this_category = wp_list_categories('orderby=id&show_count=0&title_li=&use_desc_for_title=1&child_of='.$this_category->cat_ID."&echo=0");				
					}		
									
					?>
							
					<ul>
						<?php echo $this_category; ?>
					</ul>
				</div><!-- widget_category-->
						
				<div class="widget_author">
					<span>
						<?php wp_tag_cloud('number=0&smallest=8&largest=18'); ?>
					</span>
				</div><!-- widget_author -->
			</div><!-- widget_content -->
		</div><!--inner -->
	</div><!--outer -->
	
	<?php } else { ?>

			<h3>Tags</h3>
			<div class="tags">
				<?php wp_tag_cloud('smallest=8&largest=18'); ?>
			</div>
		</div><!--inner -->
	</div><!--outer -->	
		
	<?php } ?>
</div><!--sidebar -->